package com.yunduansing.core.commons;

public class DbCommon {
	public class GridModel{
		/**
		 *  每页显示条数
		 */
		private int pageSize;
		/**
		 * 当前页
		 */
		private int pageIndex;
		public int getPageSize() {
			return pageSize;
		}
		public void setPageSize(int pageSize) {
			this.pageSize = pageSize;
		}
		public int getPageIndex() {
			return pageIndex;
		}
		public void setPageIndex(int pageIndex) {
			this.pageIndex = pageIndex;
		}
	}
	public class PagerModel{
		/**
		 * 当前页
		 */
		private int pageIndex;
		/**
		 * 记录行数
		 */
		private int rowCount;
		/**
		 * 总页数
		 */
		private int pageCount;
		/**
		 * 数据
		 */
		private Object data;
		public int getPageIndex() {
			return pageIndex;
		}
		public void setPageIndex(int pageIndex) {
			this.pageIndex = pageIndex;
		}
		public int getRowCount() {
			return rowCount;
		}
		public void setRowCount(int rowCount) {
			this.rowCount = rowCount;
		}
		public int getPageCount() {
			return pageCount;
		}
		public void setPageCount(int pageCount) {
			this.pageCount = pageCount;
		}
		public Object getData() {
			return data;
		}
		public void setData(Object data) {
			this.data = data;
		}
	}
	public class SearchModel{
		private String key;

		public String getKey() {
			return key;
		}

		public void setKey(String key) {
			this.key = key;
		}
	}
	
	public static class Grid{
		private int index;
		private int size;
		private int begin;
		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		public int getSize() {
			return size;
		}
		public void setSize(int size) {
			this.size = size;
		}
		public int getBegin() {
			return (index-1)*size;
		}
		public void setBegin(int begin) {
			this.begin = begin;
		}
	}
	public static class Pager{
		private int index;
		private int rows;
		private Object data;
		
		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		public int getRows() {
			return rows;
		}
		public void setRows(int rows) {
			this.rows = rows;
		}
		public Object getData() {
			return data;
		}
		public void setData(Object data) {
			this.data = data;
		}
	}
}
